﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using MinhTuan;
using News;
public partial class news_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BindData();
            Access.UpdatePage(Page.Header);
        }
    }
    public void BindData()
    {
        ListNews.DataSource = News.NewsItem.ShowAll("VN");
        ListNews.DataBind();
    }
    protected void ListNews_PagePropertiesChanging(object sender, PagePropertiesChangingEventArgs e)
    {
        DataPager myPager = (DataPager)this.ListNews.FindControl("DataPager");
        myPager.SetPageProperties(e.StartRowIndex, e.MaximumRows, false);
        BindData();
    }
}
